const path = require('path')

let fpath = '/a/b/c/index.html'

console.log(fpath)

let fullName = path.basename(fpath)

console.log(fullName)

let nameExt = path.basename(fpath,'.html')

console.log(nameExt)

let extName = path.extname(fpath)

console.log(extName)